package com.extension.company.view.income;

import android.app.Activity;
import android.support.v7.widget.LinearLayoutManager;

import com.extension.company.admin.R;
import com.extension.company.common.mvc.BaseFragment;
import com.extension.company.common.utils.DisplayUtils;
import com.extension.company.view.adapter.SellerPageAdapter;
import com.extension.company.common.widget.PullRefreshRecyclerView;
import com.extension.company.common.widget.RecycleViewDivider;

import butterknife.BindView;

public class FragmentSPage2 extends BaseFragment {
    private Activity activity;

    @BindView(R.id.mRecyclerView)
    PullRefreshRecyclerView mRecyclerView;

    private SellerPageAdapter adapter;

    @Override
    public void init() {
        activity = getActivity();
        mRecyclerView.setPullRefreshEnable(false);
        mRecyclerView.setGridLayout(2);
        mRecyclerView.addItemDecoration(new RecycleViewDivider(activity, LinearLayoutManager.VERTICAL,
                DisplayUtils.convertDip2Px(activity, 12), getResources().getColor(R.color.all_background)));
        adapter = new SellerPageAdapter(activity, null);
        mRecyclerView.setAdapter(adapter);
    }

    @Override
    public int getMainLayout() {
        return R.layout.base_recyclerview;
    }
}
